@extends('admin.layout.index')

@section('content')
    <div class="mws-panel-body no-padding">
        <form class="mws-form" action="/admin/good" method="post" enctype="multipart/form-data">
            {{csrf_field()}}
            <div class="mws-form-inline">
                <div class="mws-form-row">
                    <label class="mws-form-label">商品名称</label>
                    <div class="mws-form-item">
                        <input type="text" class="small" name="gname">
                    </div>
                </div>
                <div class="mws-form-row">
                    <label class="mws-form-label">所属分类</label>
                    <div class="mws-form-item" style="width:300px">
                        <select class="large" name="g_cid">
                            <option>--请选择--</option>
                            @foreach($s as $k=>$v)
                                <option value="{{$v['cid']}}">{{$v['cname']}}</option>
                            @endforeach
                        </select>
                    </div>
                </div>
                <div class="mws-form-row">
                    <label class="mws-form-label">商品特点</label>
                    <div class="mws-form-item">
                        <input type="text" class="small" name="gfeature">
                    </div>
                </div>
                <div class="mws-form-row">
                    <label class="mws-form-label">商品售价</label>
                    <div class="mws-form-item">
                        <input type="text" class="small" name="gcost">
                    </div>
                </div>
                <div class="mws-form-row">
                    <label class="mws-form-label">商品库存</label>
                    <div class="mws-form-item">
                        <input type="text" class="small" name="gnum">
                    </div>
                </div>
                <div class="mws-form-row">
                    <label class="mws-form-label" >商品图片</label>
                    <div class="mws-form-item"style="width:300px" >
                        <input type="file" class="small" name="gphoto">
                    </div>
                </div>
                <div class="mws-form-row">
                    <label class="mws-form-label">商品描述</label>
                    <div class="mws-form-item">


                        <tr>
                            <th>内容：</th>
                            <td>
                                <script type="text/javascript" charset="utf-8" src="{{asset('ueditor/ueditor.config.js')}}"></script>
                                <script type="text/javascript" charset="utf-8" src="{{asset('ueditor/ueditor.all.min.js')}}"> </script>
                                <!--建议手动加在语言，避免在ie下有时因为加载语言失败导致编辑器加载失败-->
                                <!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型，比如你在配置项目里配置的是英文，这里加载的中文，那最后就是中文-->
                                <script type="text/javascript" charset="utf-8" src="{{asset('ueditor/lang/zh-cn/zh-cn.js')}}"></script>



                                <script id="editor" type="text/plain" name="gcontent" style="width:600px;height:320px;"></script>

                                <script>
                                    var ue = UE.getEditor('editor');
                                </script>
                                <style>
                                    .edui-default{line-height: 28px;}
                                    div.edui-combox-body,div.edui-button-body,div.edui-splitbutton-body
                                    {overflow: hidden; height:20px;}
                                    div.edui-box{overflow: hidden; height:22px;}
                                </style>

                            </td>
                        </tr>
                    </div>
                </div>





            </div>
            <div class="mws-button-row">
                <input type="submit" value="Submit" class="btn btn-danger">
                <input type="reset" value="Reset" class="btn ">
            </div>
        </form>
    </div>
@endsection